<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
class offer extends CI_Controller {
        public $mydata = array();
        function __construct()
        {
            parent::__construct();
            $this->load->model('offermodel');
            $this->mydata['query_o'] = $this->offermodel->getAllOffer();
        }
	public function index()
	{ 
            $this->load->model('adminmodel');
            $data['query'] = $this->adminmodel->getAllRole();
            $data['active'] = 'Offer';
            $this->load->view('header',$data);
            
            $this->load->view('offerView',$this->mydata);
	}
        function toJsonAll()
        {
            echo json_encode($this->mydata['query_o'],JSON_UNESCAPED_SLASHES); 
            
        }
        function toJsonByID()
        {
            
        }

}